﻿using System;
using System.Drawing;

namespace GraphDrawing.Resources
{
    public static class ResourceFactory
    {
        static readonly Type TYPE = typeof (ResourceFactory);

        public static Image GetImage(string name)
        {
            var stream = TYPE.Assembly.GetManifestResourceStream(TYPE.Namespace + "." + name + ".png");
            return Image.FromStream(stream);
        }
    }
}